package com.atguigu.gulimail.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author fangy
 * @date 2022-10-23 23:16
 */
@Slf4j
@Component
public class HelloSchedule {

    @Async
    @Scheduled(cron = "0 0 0 24 10 ?")
    public void test() throws InterruptedException {

        log.info("scheduled");
        Thread.sleep(3000);
    }

}
